Learn about the relationship between filters and facetFilters.
filters
parameter is the best choice for filtering.
However, numericFilters
and facetFilters
also offer comparable capabilities and can be used to suit different filtering needs.
filters
Notes | |
---|---|
Parameter | filters |
Syntax | String |
Best for | Filtering with a mix of string and numeric filters |
Key points | A familiar SQL syntax. You can use boolean logical operators: AND, OR, NOT |
numericFilters
Notes | |
---|---|
Parameter | numericFilters |
Syntax | String |
Best for | Filtering dates and numeric values |
Key points | Like filters but limited to numeric data |
facetFilters
Notes | |
---|---|
Parameter | facetFilters |
Syntax | String or string array |
Best for | Filtering with a mix of strings and complex boolean logic |
Key points | Can’t be used for numeric filtering |
filters
and facetFilters
facetFilters
but more generally may prove to be more flexible.
For example, you can use filters
programmatically to create a reduced set of records based on a user’s profile, and then apply facetFilters
to reflect the facets that users have chosen.